package com.bamboo.eduorder.service;

import com.bamboo.eduorder.entity.Order;
import com.bamboo.eduorder.entity.vo.CreateOrderVo;
import com.baomidou.mybatisplus.extension.service.IService;

/**
 * <p>
 * 订单 服务类
 * </p>
 *
 * @author jack.wu
 * @since 2020-07-20
 */
public interface OrderService extends IService<Order> {

    /**
     * 根据课程号创建订单
     * @param orderVo 生成订单vo
     * @return 订单号
     */
    String createOrder(CreateOrderVo orderVo);

    /**
     * 查询订单
     * @param orderNo 订单号
     * @return 订单
     */
    Order getOrderByOrderNo(String orderNo);

    boolean isBuyCourse(String courseId, String memberId);
}
